package com.wg.web_app.domin.response;

import java.util.List;
import java.util.Map;

import com.wg.web_app.dao.table.TableGroup;
import com.wg.web_app.dao.table.TableNumber;


public class Group {
	int id;
	String name;
	String detail;
	List<User> users;

	public Group() {

	}
	
	public Group(int id, String name) {
		this.id = id;
		this.name = name;
	}

	public Group(String id, String name) {
		this.id = Integer.parseInt(id);
		this.name = name;
	}

	public Group(String id, String name, String detail) {
		this.id = Integer.parseInt(id);
		this.name = name;
		this.detail = detail;
	}

	public Group(Map<String, Object> map) {
		this.id = Integer.parseInt(map.get("id").toString());
		this.name = map.get("name").toString();
		this.detail = map.get("detail").toString();
	}

	public Group(int id, String name, String detail,List<User> users) {
		this.id = id;
		this.name = name;
		this.detail = detail;
		this.users = users;
	}
	public Group(TableGroup data) {
		this.id = data.getId();
		this.detail = data.getDetail();
		this.name = data.getName();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public List<User> getUsers() {
		return users;
	}

}
